import { defineStore } from 'pinia'

export const useMenusStore = defineStore({
  id: 'app-menus',
  state: () => ({
    openKeys: Array<string>(),
    selectedKeys: Array<string>()
  }),
  getters: {
    getOpenKeys(): string[] {
      return this.openKeys
    },
    getSelectedKeys(): string[] {
      return this.selectedKeys
    }
  },
  actions: {
    setOpenKeys(keys: string[]) {
      this.openKeys = keys
    },
    setSelectedKeys(keys: string[]) {
      this.selectedKeys = keys
    }
  }
})
